home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / one_scrs / one.c < prev    next >
C/C++ Source or Header  |  1996-07-21  |  22KB  |  734 lines

  1. /*
  2.  
  3.   This is the main source of Shock!'s Flag96 party contribution demo entitled:
  4.  
  5.                              · ··∙∙∙O∙N∙E∙∙∙·· ·
  6.  
  7.   Remember, if you modify something in the sources, and you compile it with
  8.   the ass.bat, it's gonna hang, because the music loader routines  need the
  9.   correct length of the exe file, so you gotta modify  those pointers which
  10.   hold the music_offsets (got the point?)...
  11.  
  12.   have phun, but don't rip too much ;))
  13.  
  14.   GENESIS & TSC
  15.  
  16. */
  17.  
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. #include <fcntl.h>
  21. #include <conio.h>
  22. #include <io.h>
  23. #include <dos.h>
  24. #include <string.h>
  25. #include <malloc.h>
  26. #include <math.h>
  27. #include "\wc\myh\macro.h"
  28. #include "c\loader3.c"
  29. #include "c\motionbl.c"
  30. #include "c\tunnel.c"
  31. #include "c\sive.c"
  32. #include "c\pal.c"
  33. #include "c\twist.c"
  34.  
  35. #pragma aux tunnel1 "_*" parm caller [];
  36. extern void tunnel1(void);
  37. #pragma aux tunnel2 "_*" parm caller [];
  38. extern void tunnel2(void);
  39. #pragma aux scroller "_*" parm caller [];
  40. extern void scroller(void);
  41. #pragma aux julia "_*" parm caller [];
  42. extern void julia(byte *lofasz);
  43. #pragma aux julia2 "_*" parm caller [];
  44. extern void julia2(byte *lofasz);
  45. #pragma aux Effect1Init "_*" parm caller [];
  46. extern void Effect1Init(void);
  47. #pragma aux Effect1 "_*" parm caller [];
  48. extern void Effect1(void);
  49. #pragma aux Effect2Init "_*" parm caller [];
  50. extern void Effect2Init(void);
  51. #pragma aux Effect2 "_*" parm caller [];
  52. extern void Effect2(void);
  53. #pragma aux Effect3Init "_*" parm caller [];
  54. extern void Effect3Init(void);
  55. #pragma aux Effect3 "_*" parm caller [];
  56. extern void Effect3(void);
  57. #pragma aux Effect4Init "_*" parm caller [];
  58. extern void Effect4Init(void);
  59. #pragma aux Effect4 "_*" parm caller [];
  60. extern void Effect4(void);
  61. #pragma aux SP_SETCALLBACK "_*" parm caller [];
  62. extern void SP_SETCALLBACK(dword whattocall());
  63. #pragma aux Plazmabug "_*" parm caller [];
  64. extern void Plazmabug(byte *where);
  65. #pragma aux Plazmabug2 "_*" parm caller [];
  66. extern void Plazmabug2(byte *where);
  67. #pragma aux Plazmabug3 "_*" parm caller [];
  68. extern void Plazmabug3(byte *where);
  69. #pragma aux Plazmabug4 "_*" parm caller [];
  70. extern void Plazmabug4(byte *where);
  71. #pragma aux dixymainloop "_*" parm caller [];
  72. extern void dixymainloop(void);
  73. #pragma aux rangatas "_*" parm caller [];
  74. extern void rangatas(void);
  75. #pragma aux szovegkirako "_*" parm caller [];
  76. extern void szovegkirako(byte *fromwhere);
  77. #pragma aux szovegkirako2 "_*" parm caller [];
  78. extern void szovegkirako2(dword desvar);
  79. #pragma aux szovegkirako3 "_*" parm caller [];
  80. extern void szovegkirako3(byte *fromwhere);
  81. #pragma aux szovegkirako4 "_*" parm caller [];
  82. extern void szovegkirako4(dword desvar);
  83. #pragma aux puttimer "_*" parm caller [];
  84. extern void puttimer(byte *towhere,dword color);
  85. #pragma aux dectimer "_*" parm caller [];
  86. extern void dectimer(void);
  87. #pragma aux designeffect6 "_*" parm caller [];
  88. extern void designeffect6(void);
  89. extern word ory1;
  90. extern word orx1;
  91. extern word rzoom;
  92. extern dword CReal;
  93. extern dword CImag;
  94. extern byte tunincer;
  95.  
  96.     byte    *pic1, *pic2, *pic3, *pic4, *pic5, *pic6, *pic7, *pic8;
  97.         byte    *pic9, *pic10, *pic11, *pic12, *pic13;
  98.     byte    *memtestptr, *d61, *d62;
  99.     byte    *pal1, *pal2, *pal3, *pal4, *pal5, *pal6;
  100.     byte    *modplace, *screenplace;
  101.     byte    *fontbuffer,  *scrollbuffer, *fontpal;
  102.     byte    *texturebuff, *texturepal,   *screenbuff;
  103.     dword    desvar, n,u,m, oldpos, scrollend, actrow;
  104.     sdword    sintx[320],z;
  105.     float    flag,k;
  106.  
  107. #include "c\sp32.h"
  108. #include "c\getenv.c"
  109.  
  110.  
  111. void AllocateMem() {
  112.     if ((modplace  = (byte *)malloc(788000)) == NULL) ExitProcess2();
  113.     if ((pic1      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  114.     if ((pic2      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  115.     if ((pic3      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  116.     if ((pic4      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  117.     if ((pic5      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  118.     if ((pic6      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  119.     if ((pic7      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  120.     if ((pic8      = (byte *)malloc(65536)) == NULL) ExitProcess2();
  121.     if ((pic9      = (byte *)malloc(100000)) == NULL) ExitProcess2();
  122.     if ((pic10     = (byte *)malloc(65536)) == NULL) ExitProcess2();
  123.     if ((pic11     = (byte *)malloc(65536)) == NULL) ExitProcess2();
  124.     if ((pic12     = (byte *)malloc(65536)) == NULL) ExitProcess2();
  125.         if ((pic13     = (byte *)malloc(65536)) == NULL) ExitProcess2();
  126.     if ((pal1      = (byte *)malloc(768)) == NULL) ExitProcess2();
  127.     if ((pal2      = (byte *)malloc(768)) == NULL) ExitProcess2();
  128.     if ((pal3      = (byte *)malloc(768)) == NULL) ExitProcess2();
  129.     if ((pal4      = (byte *)malloc(768)) == NULL) ExitProcess2();
  130.     if ((pal5      = (byte *)malloc(768)) == NULL) ExitProcess2();
  131.     if ((pal6      = (byte *)malloc(768)) == NULL) ExitProcess2();
  132.  
  133.     if ((memtestptr= (byte *)malloc(300000)) == NULL) ExitProcess2();
  134.     free (memtestptr);
  135.  
  136.     for (n = 0; n < 788000; n++)   {*(modplace + n) = 0x00;}
  137.     for (n = 0; n < 65536; n++)   {*(pic1 + n) = 0x00;}
  138.     for (n = 0; n < 65536; n++)   {*(pic2 + n) = 0x00;}
  139.     for (n = 0; n < 65536; n++)   {*(pic3 + n) = 0x00;}
  140.     for (n = 0; n < 65536; n++)   {*(pic4 + n) = 0x00;}
  141.     for (n = 0; n < 65536; n++)   {*(pic5 + n) = 0x00;}
  142.     for (n = 0; n < 65536; n++)   {*(pic6 + n) = 0x00;}
  143.     for (n = 0; n < 65536; n++)   {*(pic7 + n) = 0x00;}
  144.     for (n = 0; n < 65536; n++)   {*(pic8 + n) = 0x00;}
  145.     for (n = 0; n < 100000; n++)   {*(pic9 + n) = 0x00;}
  146.     for (n = 0; n < 65536; n++)   {*(pic10 + n) = 0x00;}
  147.     for (n = 0; n < 65536; n++)   {*(pic11 + n) = 0x00;}
  148.     for (n = 0; n < 65536; n++)   {*(pic12 + n) = 0x00;}
  149.         for (n = 0; n < 65536; n++)   {*(pic13 + n) = 0x00;}
  150.     for (n = 0; n <   768; n++)   {*(pal1 + n) = 0x00;}
  151.     for (n = 0; n <   768; n++)   {*(pal2 + n) = 0x00;}
  152.     for (n = 0; n <   768; n++)   {*(pal3 + n) = 0x00;}
  153.     for (n = 0; n <   768; n++)   {*(pal4 + n) = 0x00;}
  154.     for (n = 0; n <   768; n++)   {*(pal5 + n) = 0x00;}
  155.     for (n = 0; n <   768; n++)   {*(pal6 + n) = 0x00;}
  156.     }
  157.  
  158. void DeAllocateMem() {
  159.     free(modplace);
  160.     free(pic1);
  161.     free(pic2);
  162.     free(pic3);
  163.     free(pic4);
  164.     free(pic5);
  165.     free(pic6);
  166.     free(pic7);
  167.     free(pic8);
  168.     free(pic9);
  169.     free(pic10);
  170.     free(pic11);
  171.     free(pic12);
  172.         free(pic13);
  173.     free(pal1);
  174.     free(pal2);
  175.     free(pal3);
  176.     free(pal4);
  177.     free(pal5);
  178.     free(pal6);
  179.     }
  180.  
  181. #include "c\vectsys.c"
  182.  
  183. void ExitProcess() {
  184.     if (getch()==27)
  185.         {
  186.         set80x25x16();
  187.         SP_QUIET=0;
  188.                 stopmusic();
  189.         DeAllocateMem();
  190.         printf("DEMO_DEINIT: RELEASING MEMORY\n");
  191.         exit(0);
  192.         }
  193.     }
  194.  
  195. void gensintables(void)
  196. {
  197.     dword d;
  198.     float k;
  199.     float f;
  200.     dword l;
  201.     dword m;
  202.  
  203.     f=flag/14;
  204.     for(d=0; d<320; d++)
  205.     {
  206.         k=d;
  207.         sintx[d]=sin(k/((10*sin(cos(f*10)/15))-f))*11;
  208.     }
  209. }
  210.  
  211. void ExitProcess2() {
  212.     printf ("DEMO_INIT: NOT ENOUGH MEMORY!\n");
  213.     SP_QUIET=0;
  214.         stopmusic();
  215.     DeAllocateMem();
  216.     printf("DEMO_DEINIT: RELEASING MEMORY\n");
  217.     exit(0);
  218.     }
  219.  
  220. /****** System initialization ************************************************/
  221.  
  222. void main(void) {
  223.  
  224.         headermessy();
  225.     printf("\nDEMO_INIT: ALLOCATING MEMORY (8 MBYTES REQUIRED!)\n");
  226.     AllocateMem();
  227.     printf("DEMO_INIT: INITIALIZING VIDEO SUBSYSTEM\n");
  228.     siveinit();
  229.  
  230. /****** Effect: kezdodik a moka **********************************************/
  231.  
  232.     printf("DEMO_INIT: LOADING GRAPHICS\n");
  233.         loader(0,angrad);
  234.     loader(20,angrad2);
  235.         loader(1,pic8);
  236.     loader(17,pic4);        // Loading the credit pics
  237.     loader(18,pic5);
  238.     loader(19,pic6);
  239.     loader(8,pic7);         // Loading the ONE pic
  240.         loader(9,pal6);
  241.     loader(14,pic9+18000);        // Loading the REDGREEN.LBM
  242.     loader(6,blurcolors);        // For Kewl Forgo Genya1
  243.     loader(10,blurcolors3);     // For Kewl Forgo Genya2
  244.     loader(12,blurcolors4);     // For Kewl Forgo Genya3
  245.     loader(23,pic1);        // For the first SHOCK! logo
  246.     loader(24,pal1);        // For the first SHOCK! logo
  247.         loader(25,pic11);               // Loading the MURDER.DAT
  248.         loader(26,pal5);                // Loading the MURDER.PAL
  249.         loader(27,pic12);               // Message for repulo
  250.         loader(22,vct);                 // Loading vector part 1
  251.         loader(28,pic13);               // Loading the JOKER.DAT
  252.         loader(31,blurcolors5);         // Loading the varos.mot
  253.         getgusport();
  254.         startmusic();
  255.     SP_SETCALLBACK(&dectimer);
  256.  
  257. /****** Effect: Bejon az elso SHOCK! logo ************************************/
  258.  
  259.     set320x200x256();
  260.     setpal8(pal1);
  261.     oldpos=position;
  262.     screenplace=0x0a0000;
  263.     d62=pic3;
  264.     d61=pic2;
  265.     m=0;
  266.     do        {
  267.              if (kbhit()) ExitProcess();
  268.              UpdateInfo();
  269.              designeffect6();
  270.              m++;
  271.              disp320x200x256(d62);
  272.             } while (m!=199);
  273.     m=0;
  274.     do        {
  275.              if (kbhit()) ExitProcess();
  276.              UpdateInfo();
  277.              rasterwait();
  278.              disp320x200x256(d62);
  279.             } while (position!=oldpos+4);
  280.  
  281. /****** Effect: Felvillan az ONE felirat *************************************/
  282.  
  283.     set320x200x256();
  284.     loader(7,pal1);
  285.     setpal8(pal1);
  286.     texture=pic8;
  287.     vmem=pic1;
  288.     oldpos=position;
  289.         do              {
  290.              if (kbhit()) ExitProcess();
  291.              UpdateInfo();
  292.              tunnel2();
  293.              szovegkirako3(pic7);
  294.              puttimer(pic1,50);
  295.              disp320x200x256(pic1);
  296.             } while (position!=oldpos+1);
  297.  
  298. /****** Effect: Kewl forgo genya 1 *******************************************/
  299.  
  300.     for (n = 0; n < 65536; n++)   {*(pic1 + n) = 0x00;}
  301.     for (n = 0; n < 65536; n++)   {*(pic2 + n) = 0x00;}
  302.     for (n = 0; n < 65536; n++)   {*(pic3 + n) = 0x00;}
  303.     loader(7,pal1);
  304.     setpal8(pal1);
  305.     Effect2Init();;
  306.     InitBlur();
  307.     oldpos=position;
  308.  
  309.     do        {
  310.                          if (SP_ACTROW == 2)  { ory1=16384; orx1=0;}
  311.              if (SP_ACTROW == 8)  { ory1=0; orx1=16384;}
  312.              if (SP_ACTROW == 16) { ory1=32768; orx1=0;}
  313.              if (SP_ACTROW == 24) { ory1=16384; orx1=32768;}
  314.              if (SP_ACTROW == 32) { ory1=0; orx1=0;}
  315.              if (SP_ACTROW == 40) { ory1=32768; orx1=16384;}
  316.              if (SP_ACTROW == 48) { ory1=16384; orx1=40000;}
  317.              if (SP_ACTROW == 56) { ory1=40000; orx1=0;}
  318.              if (SP_ACTROW > 62)  { ory1=16384; orx1=20000;}
  319.  
  320.              if (kbhit()) ExitProcess();
  321.              UpdateInfo();
  322.              Effect2();
  323.              julia2(pic2);
  324.              Plazmabug(pic1);
  325.              motionblur(pic2);
  326.              puttimer(toscreen,50);
  327.              disp320x200x256(toscreen);
  328.             } while (position!=oldpos+3);
  329.  
  330. /****** Effect: Kewl forgo genya 2 *******************************************/
  331.  
  332.     set320x200x256();
  333.     for (n = 0; n < 65536; n++)   {*(pic1 + n) = 0x00;}
  334.     for (n = 0; n < 65536; n++)   {*(pic2 + n) = 0x00;}
  335.     for (n = 0; n < 65536; n++)   {*(pic3 + n) = 0x00;}
  336.     loader(11,pal1);
  337.     loader(16,pic3);
  338.     setpal8(pal1);
  339.     Effect3Init();;
  340.     InitBlur();
  341.     oldpos=position;
  342.     do        {
  343.              if (kbhit()) ExitProcess();
  344.              UpdateInfo();
  345.              Effect3();
  346.                          Plazmabug4(pic1);
  347.              motionblur3(pic2);
  348.              puttimer(toscreen,83);
  349.              disp320x200x256(toscreen);
  350.             } while (position!=oldpos+1);
  351.     oldpos=position;
  352.     desvar=1;
  353.     do        {
  354.              if (kbhit()) ExitProcess();
  355.              UpdateInfo();
  356.                          if (SP_ACTROW == 2) desvar=320*77;
  357.              if (SP_ACTROW == 16) desvar=320*77;
  358.              if (SP_ACTROW == 24) desvar=320*77;
  359.              if (SP_ACTROW == 36) desvar=320*77;
  360.              if (SP_ACTROW == 48) desvar=320*77;
  361.              if (SP_ACTROW == 56) desvar=320*77;
  362.              Effect3();
  363.              Plazmabug(pic1);
  364.              motionblur3(pic2);
  365.              szovegkirako2(desvar);
  366.              desvar=320*1;
  367.              puttimer(toscreen,83);
  368.              disp320x200x256(toscreen);
  369.             } while (position!=oldpos+2);
  370.  
  371. /****** Effect: Megint Felvillan az ONE felirat ******************************/
  372.  
  373.     set320x200x256();
  374.     loader(7,pal1);
  375.     setpal8(pal1);
  376.     texture=pic8;
  377.     vmem=pic1;
  378.     oldpos=position;
  379.  
  380.     do        {
  381.              if (kbhit()) ExitProcess();
  382.              UpdateInfo();
  383.              tunnel2();
  384.              szovegkirako3(pic7);
  385.              puttimer(pic1,50);
  386.              disp320x200x256(pic1);
  387.             } while (position!=oldpos+1);
  388.  
  389.  
  390. /****** Effect: Kewl forgo genya 3 *******************************************/
  391.  
  392.     set320x200x256();
  393.     for (n = 0; n < 65536; n++)   {*(pic1 + n) = 0x00;}
  394.     for (n = 0; n < 65536; n++)   {*(pic2 + n) = 0x00;}
  395.     for (n = 0; n < 65536; n++)   {*(pic3 + n) = 0x00;}
  396.     loader(13,pal1);
  397.     setpal8(pal1);
  398.     Effect4Init();;
  399.     InitBlur();
  400.     oldpos=position;
  401.     do        {
  402.              if (kbhit()) ExitProcess();
  403.                          if (SP_ACTROW == 2)  szovegkirako(pic4);
  404.              if (SP_ACTROW == 16) szovegkirako(pic5);
  405.              if (SP_ACTROW == 24) szovegkirako(pic6);
  406.              if (SP_ACTROW == 36) szovegkirako(pic4);
  407.              if (SP_ACTROW == 48) szovegkirako(pic5);
  408.              if (SP_ACTROW == 56) szovegkirako(pic6);
  409.              UpdateInfo();
  410.              Effect4();
  411.              Plazmabug2(pic1);
  412.              motionblur4(pic2);
  413.              puttimer(toscreen,210);
  414.              disp320x200x256(toscreen);
  415.             } while (position!=oldpos+4);
  416.  
  417. /****** Effect: Bekocsonyazodik a RedGreen.lbm *******************************/
  418.  
  419.     for (n = 0; n < 65536; n++)   {*(pic1 + n) = 0x00;}
  420.     for (n = 0; n < 65536; n++)   {*(pic2 + n) = 0x00;}
  421.     for (n = 0; n < 65536; n++)   {*(pic3 + n) = 0x00;}
  422.     set320x200x256();
  423.     texturebuff=pic9+18000;
  424.     texturepal=pal1;
  425.     screenbuff=pic2;
  426.     loader(15,texturepal);
  427.     setpal8(texturepal);
  428.     flag=0;
  429.     gensintables();
  430.     oldpos=position;
  431.     do        {
  432.              if (kbhit()) ExitProcess();
  433.              UpdateInfo();
  434.              dixymainloop();
  435.              puttimer(screenbuff,50);
  436.              rasterwait();
  437.              disp320x200x256(screenbuff);
  438.              flag++;
  439.              gensintables();
  440.             } while (position!=oldpos+2);
  441.  
  442. /****** Effect: Megjon a Redgreen.lbm normalisan *****************************/
  443.  
  444.     for (n = 0; n < 768; n++)   {*(pal2 + n) = 63;}
  445.     setpal8(pal2);
  446.     disp320x200x256(pic9+18000);
  447.     oldpos=position;
  448.     do        {
  449.              if (kbhit()) ExitProcess();
  450.              palmorph(pal2,pal1);
  451.              setpal8(pal2);
  452.              rasterwait();
  453.              disp320x200x256(pic9+18000);
  454.              puttimer(screenplace,50);
  455.              UpdateInfo();
  456.             } while (position!=oldpos+2);
  457.     n=0;
  458.     m=1;
  459.     u=1;
  460.     oldpos=position;
  461.     rzoom=0;
  462.     do        {
  463.              if (kbhit()) ExitProcess();
  464.              n=SP_ACTROW;
  465.              if (SP_ACTROW == 4) {m=m+2;n++;}
  466.              if (SP_ACTROW ==16) {m=m+2;n++;}
  467.              if (SP_ACTROW ==32) {m=m+2;n++;}
  468.              if (SP_ACTROW ==48) {m=m+2;n++;}
  469.              u=-u;
  470.              rzoom=320*((rand()/(32768/m)));
  471.              rasterwait();
  472.              disp320x200x256(pic9+18000+rzoom);
  473.              puttimer(screenplace,50);
  474.              UpdateInfo();
  475.             } while (position!=oldpos+2);
  476.  
  477. /****** Effect: Már Megint Felvillan az ONE felirat **************************/
  478.  
  479.     set320x200x256();
  480.     loader(7,pal1);
  481.     setpal8(pal1);
  482.     texture=pic8;
  483.     vmem=pic1;
  484.     oldpos=position;
  485.  
  486.     do        {
  487.              if (kbhit()) ExitProcess();
  488.              UpdateInfo();
  489.              tunnel2();
  490.              szovegkirako3(pic7);
  491.              puttimer(pic1,50);
  492.              disp320x200x256(pic1);
  493.             } while (position!=oldpos+1);
  494.  
  495. /****** Effect: erdekes twister **********************************************/
  496.  
  497.  
  498.         loader(21,pal1);
  499.     set320x200x256();
  500.     setpal8(pal1);
  501.     twistinit();
  502.     twistsource=pic1;
  503.     twisttarget=pic2;
  504.     maindegree=0;
  505.     desvar=1;
  506.     u=1;
  507.     n=0;
  508.     oldpos=position;
  509.     InitBlur();
  510.     maindegree=u*sind[n];
  511.     maindegree=u*cosd[n]+maindegree;
  512.  
  513.     do        {
  514.              if (kbhit()) ExitProcess();
  515.              UpdateInfo();
  516.              m=0;
  517.                          if (SP_ACTROW == 0)  {m=10000;}
  518.              if (SP_ACTROW == 8)  {m=-10000;}
  519.              if (SP_ACTROW == 16) {m=10000;}
  520.              if (SP_ACTROW == 24) {m=-10000;}
  521.              if (SP_ACTROW == 32) {m=10000;}
  522.              if (SP_ACTROW == 40) {m=-10000;}
  523.              if (SP_ACTROW == 48) {m=10000;}
  524.              if (SP_ACTROW == 56) {m=-10000;}
  525.                          if (SP_ACTROW == 1)  {m=10000;}
  526.                          if (SP_ACTROW == 9)  {m=-10000;}
  527.                          if (SP_ACTROW == 17) {m=10000;}
  528.                          if (SP_ACTROW == 25) {m=-10000;}
  529.                          if (SP_ACTROW == 33) {m=10000;}
  530.                          if (SP_ACTROW == 41) {m=-10000;}
  531.                          if (SP_ACTROW == 49) {m=10000;}
  532.                          if (SP_ACTROW == 57) {m=-10000;}
  533.              maindegree=maindegree+m;
  534.              twist();
  535.              Plazmabug3(pic1);
  536.                          puttimer(pic2,160);
  537.              rasterwait();
  538.                          disp320x200x256(pic2);
  539.             } while (position!=oldpos+2);
  540.     oldpos=position;
  541.     n=0;
  542.     m=0;
  543.     u=2;
  544.     do        {
  545.              if (kbhit()) ExitProcess();
  546.              UpdateInfo();
  547.              m=0;
  548.                          if (SP_ACTROW == 0)  {u=-u;m=5000;}
  549.              if (SP_ACTROW == 8)  {u=-u;m=5000;}
  550.              if (SP_ACTROW == 16) {u=-u;m=5000;}
  551.              if (SP_ACTROW == 24) {u=-u;m=5000;}
  552.              if (SP_ACTROW == 32) {u=-u;m=5000;}
  553.              if (SP_ACTROW == 40) {u=-u;m=5000;}
  554.              if (SP_ACTROW == 48) {u=-u;m=5000;}
  555.              if (SP_ACTROW == 56) {u=-u;m=5000;}
  556.                          if (SP_ACTROW == 1)  {u=-u;m=5000;}
  557.                          if (SP_ACTROW == 9)  {u=-u;m=5000;}
  558.                          if (SP_ACTROW == 17) {u=-u;m=5000;}
  559.                          if (SP_ACTROW == 25) {u=-u;m=5000;}
  560.                          if (SP_ACTROW == 33) {u=-u;m=5000;}
  561.                          if (SP_ACTROW == 41) {u=-u;m=5000;}
  562.                          if (SP_ACTROW == 49) {u=-u;m=5000;}
  563.                          if (SP_ACTROW == 57) {u=-u;m=5000;}
  564.              maindegree=u*sind[n];
  565.              maindegree=u*cosd[n]+maindegree+m;
  566.                          n=n+2;
  567.              if (n==128) n=0;
  568.              twist();
  569.                          puttimer(pic2,160);
  570.              rasterwait();
  571.                          disp320x200x256(pic2);
  572.             } while (position!=oldpos+2);
  573.  
  574.  
  575. /****** Effect: julia morpher + tunnel ***************************************/
  576.  
  577.     loader(2,pal1);
  578.     set320x200x256();
  579.     setpal8brighten(pal1);
  580.     texture=pic8;
  581.     vmem=pic2;
  582.     oldpos=position;
  583.     do        {
  584.              if (kbhit()) ExitProcess();
  585.              UpdateInfo();
  586.                          if (SP_ACTROW == 0)  {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  587.              if (SP_ACTROW == 8)  {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  588.              if (SP_ACTROW == 16) {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  589.              if (SP_ACTROW == 24) {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  590.              if (SP_ACTROW == 32) {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  591.              if (SP_ACTROW == 40) {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  592.              if (SP_ACTROW == 48) {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  593.              if (SP_ACTROW == 56) {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  594.                          if (SP_ACTROW == 1)  {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  595.                          if (SP_ACTROW == 9)  {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  596.                          if (SP_ACTROW == 17) {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  597.                          if (SP_ACTROW == 25) {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  598.                          if (SP_ACTROW == 33) {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  599.                          if (SP_ACTROW == 41) {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  600.                          if (SP_ACTROW == 49) {CReal=CReal+400;CImag=CImag+400;tunincer=-tunincer;}
  601.                          if (SP_ACTROW == 57) {CReal=CReal-400;CImag=CImag-400;tunincer=-tunincer;}
  602.              tunnel1();
  603.              julia(vmem);
  604.              puttimer(vmem,30);
  605.              rasterwait();
  606.              disp320x200x256(vmem);
  607.             } while (position!=oldpos+4);
  608.  
  609. /****** Effect: Bejon a MURDER picture ***************************************/
  610.  
  611.     set320x200x256();
  612.     oldpos=position;
  613.     screenplace=0x0a0000;
  614.     for (n = 0; n < 768; n++)   {*(pal2 + n) = 63;}
  615.     setpal8(pal2);
  616.     do        {
  617.              if (kbhit()) ExitProcess();
  618.              UpdateInfo();
  619.              rasterwait();
  620.              palmorph(pal2,pal5);
  621.              setpal8(pal2);
  622.              disp320x200x256(pic11);
  623.              puttimer(screenplace,10);
  624.             } while (position!=oldpos+1);
  625.  
  626. /****** Effect: nyomorult repulo *********************************************/
  627.  
  628.         vectorpart1();
  629.  
  630. /****** Effect: Már Megint Felvillan az ONE felirat **************************/
  631.  
  632.     set320x200x256();
  633.     loader(7,pal1);
  634.     setpal8(pal1);
  635.     texture=pic8;
  636.     vmem=pic1;
  637.     oldpos=position;
  638.  
  639.     do        {
  640.              if (kbhit()) ExitProcess();
  641.              UpdateInfo();
  642.              tunnel2();
  643.              szovegkirako3(pic7);
  644.              puttimer(pic1,50);
  645.              disp320x200x256(pic1);
  646.             } while (position!=oldpos+1);
  647.  
  648. /****** Effect: forgo varosmicsoda *******************************************/
  649.  
  650.         vectorpart2();
  651.  
  652. /****** Effect: Bejon a JOKER picture ****************************************/
  653.  
  654.     set320x200x256();
  655.         loader(29,pal1);
  656.         oldpos=position;
  657.     screenplace=0x0a0000;
  658.     for (n = 0; n < 768; n++)   {*(pal2 + n) = 63;}
  659.     setpal8(pal2);
  660.     do        {
  661.              if (kbhit()) ExitProcess();
  662.              UpdateInfo();
  663.              rasterwait();
  664.                          palmorph(pal2,pal1);
  665.              setpal8(pal2);
  666.                          disp320x200x256(pic13);
  667.             } while (position!=oldpos+1);
  668.         for (n = 0; n < 768; n++)   {*(pal2 + n) = 0;}
  669.         for (n = 0; n < 63; n++)
  670.             {
  671.              if (kbhit()) ExitProcess();
  672.              rasterwait();
  673.                          palmorph(pal1,pal2);
  674.                          setpal8(pal1);
  675.                          disp320x200x256(pic13);
  676.                         }
  677.  
  678. /****** Effect: endscroller **************************************************/
  679.  
  680.     SP_QUIET=1;
  681.     stopmusic();
  682.     startmusic2();
  683.     SP_MASTERVOLUME=50;
  684.  
  685.     for (n = 0; n < 65536; n++)   {*(pic1 + n) = 0x00;}
  686.     for (n = 0; n < 65536; n++)   {*(pic2 + n) = 0x00;}
  687.     for (n = 0; n < 65536; n++)   {*(pic3 + n) = 0x00;}
  688.     fontbuffer=pic3;
  689.     fontpal=pal1;
  690.     loader(3,fontbuffer);
  691.     loader(4,blurcolors);
  692.     loader(5,fontpal);
  693.     scrollbuffer=pic1;
  694.     scrollend=0;
  695.     set320x200x256();
  696.     setpal8(pal1);
  697.     Effect1Init();
  698.     Initblur();
  699.     oldpos=position;
  700.  
  701.     do        {
  702.              if (kbhit()) ExitProcess();
  703.              UpdateInfo();
  704.              Effect1();
  705.              scroller();
  706.              motionblur(pic2);
  707.              rasterwait();
  708.              disp320x200x256(toscreen);
  709.             } while (scrollend!=1);
  710.  
  711.     for (n = 0; n < 65536; n++)   {*(pic1 + n) = 0x00;}
  712.     for (n = 0; n < 50; n++)
  713.             {
  714.              SP_MASTERVOLUME=SP_MASTERVOLUME-1;
  715.              rasterwait();
  716.              disp320x200x256(pic1);
  717.              rasterwait();
  718.              disp320x200x256(pic1);
  719.              rasterwait();
  720.              disp320x200x256(pic1);
  721.              rasterwait();
  722.              disp320x200x256(pic1);
  723.              if (kbhit()) ExitProcess();
  724.             }
  725.  
  726. /****** System deinitialization **********************************************/
  727.  
  728.     set80x25x16();
  729.     SP_QUIET=0;
  730.     stopmusic();
  731.     printf("DEMO_DEINIT: RELEASING MEMORY\n");
  732.     DeAllocateMem();
  733. }
  734.